<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>


#main {
            width: 80%;
            margin: 20px auto;
        }
        
        nav {
            text-align: center;
        }
        table{
            border: 1px solid black;
        }
</style>
<body>
    
    <div id="main">
        <table class="table table-bordered">
            <thead >
                <tr>
                    <th>商品名称</th>
                    <th>商品价格</th>
                    <th>图片路径</th>
                </tr>
            </thead>
            <tbody></tbody>

        </table>
        <nav aria-label="Page navigation">
            <ul class="pagination">
                <li id="pre">
                    <a href="#" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
              
            </ul>
        </nav>
    </div>

     <script>
         var json = [{
        "product_id": "1001",
        "product_name": "java核心技术1",
        "price": "120",
        "imgurl": "res/productimg/1.jpeg"
    }, {
        "product_id": "1002",
        "product_name": "java核心技术2",
        "price": "130",
        "imgurl": "res/productimg/2.jpeg"
    }, {
        "product_id": "1003",
        "product_name": "web技术",
        "price": "100",
        "imgurl": "res/productimg/3.jpeg"
    }, {
        "product_id": "1004",
        "product_name": "Mysql必知必会",
        "price": "39",
        "imgurl": "res/productimg/4.jpeg"
    }, {
        "product_id": "1005",
        "product_name": "中国近代史",
        "price": "105",
        "imgurl": "res/productimg/4.jpeg"
    }, {
        "product_id": "1006",
        "product_name": "世界史",
        "price": "110",
        "imgurl": "res/productimg/1.jpeg"
    }, {
        "product_id": "1007",
        "product_name": "高等数学",
        "price": "50",
        "imgurl": "res/productimg/1.jpeg"
    }, {
        "product_id": "1008",
        "product_name": "离散数学",
        "price": "60",
        "imgurl": "res/productimg/1.jpeg"
    }, {
        "product_id": "1010",
        "product_name": "线性代数",
        "price": "50",
        "imgurl": "res\\productimg/3e83c2a6-b529-4bee-8ca9-ecc868b4d6f7.jpeg"
    }, {
        "product_id": "1011",
        "product_name": "数据结构",
        "price": "100",
        "imgurl": "res\\productimg/53dccb9f-b918-4a81-acc9-f99594992db1.jpeg"
    }, {
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    },{
        "product_id": "1013",
        "product_name": "人工智能",
        "price": "120",
        "imgurl": "res\\productimg/94736781-046b-4c7c-8499-bebad2542b6f.jpg"
    }, {
        "product_id": "1014",
        "product_name": "大数据",
        "price": "120",
        "imgurl": "res\\productimg/f891569d-45e3-4b7f-a37e-980273f84508.jpg"
    }];
   document.querySelector('tbody').innerHTML=    json.map(item =>{
       return `
             <tr>
                <td>${item.product_name}</td>
                <td>${item.price}</td>
                <td>${item.imgurl}</td>
                </tr>
     
            `
         
       }).join('')
    
 </script>





</body>
</html>